﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace InstaGM
{
    public partial class config_item : Form
    {
        public int remITEMid { get; set; }
        public int remITEMamt { get; set; }
        public int remITEMenc { get; set; }
        public int remITEMlv { get; set; }
        public string primary_remITEMflag { get; set; }
        public int remITEMflag { get; set; }

        public config_item()
        {
            InitializeComponent();
        }

        private void config_item_Load(object sender, EventArgs e)
        {

        }

        private void sent_item_btn_Click(object sender, EventArgs e)
        {
            //Let's define our variables
            remITEMamt = Convert.ToInt32(conf_item_amt.Text);
            remITEMenc = Convert.ToInt32(conf_item_enc.Text);
            remITEMlv = Convert.ToInt32(conf_item_lv.Text);
            primary_remITEMflag = conf_item_flag.Text;
            //If a flag hasn't been set yet let's make him an item by default
            if (conf_item_flag.SelectedIndex == -1)
            {
                MessageBox.Show("You must select a flag to continue!");
            }
            else
            {
                //Let's convert flag string to int
                if (primary_remITEMflag == "Item")
                {
                    remITEMflag = 2;
                    this.Close();
                }
                if (primary_remITEMflag == "Looter")
                {
                    remITEMflag = 32;
                    this.Close();
                }
            }
        }      
    }
}
